/**
 * 
 */
package at.ac.tuwien.swa075.telco.bc.dao;

import java.sql.Timestamp;

import at.ac.tuwien.swa075.telco.bc.BCException;

/**
 * @author vovmj01
 *
 */
public interface ITarifDAO {
	/**
	 * Deletes an existing tarif
	 * @param tarifNumber The identifying tarif number.
	 * @return true if an tarif was deleted.
	 * @throws BCException An error occured while deleting the tarif.
	 */
	public boolean deleteTarif(String tarifNumber) throws BCException;
	
	/**
	 * Returns a tarif the tarif valid at a given time.
	 * @param tarifNumber The identifying tarif number.
	 * @param timestamp The timestamp.
	 * @return The tarif.
	 * @throws BCException An error occured during search.
	 */
	public TarifTO findTarif(String tarifNumber, Timestamp timestamp) throws BCException;
	
	/**
	 * Returns the currently valid tarif.
	 * @param tarifNumber The identifying tarif number.
	 * @return The tarif.
	 * @throws BCException An error occured during search.
	 */
	public TarifTO findTarif(String tarifNumber) throws BCException;
	
	/**
	 * Creates a new tarif with the given tarif data.
	 * 
	 * @param tarif The tarif object.
	 * @return Returns the tarif number.
	 * @throws BCException An error occured while creating a new tarif
	 */
	public String insertTarif(TarifTO tarif) throws BCException;
	
	/**
	 * Updates the data of an existing tarif.
	 * @param tarif The tarif object.
	 * @return Returns true if data was changed.
	 * @throws BCException An error occured while updating the data.
	 */
	public boolean updateTarif(TarifTO tarif) throws BCException;
}
